import request from '@/utils/request'

//获取目录列表
export const getMuluListApi = (params) => request({
    url: '/directorys',
    params,
})

//新增目录
export const addMuluApi = (data) => request({
    url: '/directorys',
    method: 'post',
    data,
})
//删除目录
export const delMuluApi = id => request({
    url: '/directorys/' + id,
    method: 'delete',
})

//获取目录详情
export const getMuluInfoApi = (id) => request({
    url: '/directorys/' + id
})
//修改目录
export const editMuluApi = data => request({
    url: '/directorys/' + data.id,
    method: 'put',
    data,
})

//修改目录状态
export const editMuluStateApi = data => request({
    url: '/directorys/' + data.id + '/' + data.state,
    method: 'post',
})